{{partial('public/header')}}

<div class="midder">
<div class="mc">
<h1 class="group_tit">
{{seo.title}}
</h1>

	<div class="cleft">
	<form method="post" onsubmit="return newTopicFrom(this)" id="form_tipic" action="{{url('group/topic/update/'~groupid)}}">
    <div style="display:none;">
    <input type="hidden" name="{{security.getTokenKey()}}" value="{{security.getToken()}}">
    <input type="hidden" name="topicid" value="{{strTopic.topicid}}">
    </div>
    {% if isold %}
	<p class="autosave-tip">现在载入的是自动保存内容，时间&nbsp;<span>{{date('Y-m-d H:i:s',strTopic.addtime)}}</span></p>  
    {% endif %}  
    <div class="row note-title">
        <label class="field" for="note_title">标题:</label>
        <div>
            <input tabindex="1" id="note_title" name="title" value="" autofocus type="text" maxlength="64">
        </div>
    </div>    
    <div class="row note-text">
        <ul class="control-panel">
            <li class="image-btn">
                <a class="lnk-flat" href="javascript:;" title="插入图片" id="addImg">图片</a>
            </li>
            <li class="video-btn">
                <a class="lnk-flat" href="javascript:;" title="插入视频" id="addVideo">视频</a>
            </li>            
            <li class="link-btn">
                <a class="lnk-flat" href="javascript:;" title="插入链接" id="addLink">链接</a>
            </li>
        </ul>
        <label class="field" for="note_text">正文:</label>
        <textarea tabindex="2"  name="content" id="editor_full"></textarea>
    </div>
    <div class="images">
    </div>
    <div class="row note-reply">
        <label class="field" for="cannot_reply">权限设置: </label>
        <label>
            <input tabindex="3" id="cannot_reply" name="isreply" value="1" type="checkbox"><span>不允许回应</span>
        </label>
    </div>
    <div class="row footer">
        <input tabindex="7" id="publish_note" value="好了，发言" class="btn" name="submit" type="submit">
        <span class="bn-flat cancel-note">
            <input tabindex="8" id="cancel" value="取消" class="bn-flat" name="cancel" type="button" onClick="history.go(-1)">
        </span>
    </div>
{{hook('Editor', 'show', ['arrPhotos':arrPhotos])}}
<style>
.item-thumb-list{ padding:0px}
</style>
<script language="javascript">
$(function(){
	var typeid = '{{strTopic.topicid}}';
	$('#addImg').bind('click',function(){
		var ajaxurl = "{{url('home/images/add')}}";
		var data = "{'type':'topic','typeid':'"+typeid+"'}";		
		addPhoto(ajaxurl, data);
	});
	$('#addLink').bind('click',function(){	
		addLink();
	});
	$('#addVideo').bind('click',function(){ 
		var ajaxurl = "{{url('home/videos/add')}}";
		var data = "{'type':'topic','typeid':'"+typeid+"'}";	
		addVideo(ajaxurl,data);
	})	
});
</script>    
</form>
<div id="preview"></div>


		
    	
    </div><!--//cleft--> 



</div>
</div>
